package com.pzy.base.exception;

import java.util.Date;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 所有的预期业务异常,必须继承该异常
 */
@Setter
@Getter
@ToString
public class BizException extends Exception {

    /**
     * 异常发生时间
     */
    private Date expTime;

    public BizException(String message) {
        super(message);
        this.expTime = new Date();
    }

    public BizException(String message, Exception exception) {
        super(message, exception);
        this.expTime = new Date();
    }
}
